home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-25 | 5.2 KB | 229 lines | [TEXT/MPS ] |
- /* Copyright © 1986-1990 by Apple Computer, Inc. All rights reserved. */
-
- /* • Auto-Include the requirements for this source */
- #ifndef __TYPES.R__
- #include "Types.r"
- #endif
-
- #ifndef __MacAppTypes__
- #include "MacAppTypes.r"
- #endif
-
- #if qTemplateViews
- #ifndef __ViewTypes__
- #include "ViewTypes.r"
- #endif
- #endif
-
- #if qDebug
- include "Debug.rsrc";
- #endif
- include "MacApp.rsrc";
- include "Printing.rsrc";
-
- include $$Shell("ObjApp")"Cards" 'CODE';
-
-
- #define kWindowRsrcID 1000 /* ID of the main window or view resource */
- #define kCardViewRsrcID 1001 /* ID of the card view resource */
- #define kAboutDoc 1201 /* ID of the About box showing document info */
-
- #define kIDAppBuzz 1000 /* Our buzz string resource */
-
- /* Our command numbers */
- #define cNextCard 1000 /* Next Card command */
- #define cPrevCard 1001 /* Previous Card command */
- #define cFirstCard 1002 /* First Card command */
- #define cLastCard 1003 /* Last Card command */
- #define cNewCard 1010 /* New Card command */
- #define cDeleteCard 1011 /* Delete Card command */
-
-
- resource 'STR#' (kIDAppBuzz, purgeable) {
- {
- /* 1 */ "This document contains no cards."
- }
- };
-
-
- resource 'view' (kWindowRsrcID, purgeable) { {
- root, 'WIND', { 50, 20 }, { 150, 470 },
- sizeVariable, sizeVariable, shown, enabled,
- Window {
- "TWindow",
- zoomDocProc, goAwayBox, resizable, modeless, ignoreFirstClick, freeOnClosing,
- disposeOnFree, closesDocument, openWithDocument, dontAdaptToScreen, stagger,
- forceOnScreen, dontCenter, noID, "" };
-
- 'WIND', 'SCLR', { 0, 0 }, { 150 - kSBarSizeMinus1, 470 - kSBarSizeMinus1 },
- sizeRelSuperView, sizeRelSuperView, shown, enabled,
- Scroller {
- "TScroller",
- vertScrollBar, horzScrollBar, 0, 0, 16, 16,
- vertConstrain, horzConstrain, { 0, 0, 0, 0 } };
-
- 'SCLR', 'EMPT', { 0, 0 }, { 150 - kSBarSizeMinus1, 470 - kSBarSizeMinus1 },
- sizeSuperView, sizeSuperView, shown, enabled,
- View { "TEmptyView" }
- } };
-
-
- resource 'view' (kCardViewRsrcID, purgeable) {{
- root, 'CARD', { 0, 0 }, { 116, 1020 },
- sizeVariable, sizePage, shown, enabled,
- TEView {
- "TCardView",
- withoutStyle, autoWrap, acceptChanges, dontFreeText, cTyping, unlimited,
- { 8, 10, 0, 10 }, justSystem, applFont12 }
- } };
-
-
- resource 'SIZE' (-1) {
- saveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground,
- MultiFinderAware,
- backgroundAndForeground,
- dontGetFrontClicks,
- ignoreChildDiedEvents,
- is32BitCompatible,
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- #if qDebug
- 500 * 1024,
- 400 * 1024
- #else
- 300 * 1024,
- 200 * 1024
- #endif
- };
-
- resource 'seg!' (256, purgeable) {
- {
- "GTerminate";
- "GNonRes";
- "GWriteFile";
- "GFile";
- "GClose";
- "GDoCommand";
- "GClipboard";
- "GSelCommand"
- }
- };
-
-
- /*--------------------------------------*/
- /* About boxes */
- /*--------------------------------------*/
-
- resource 'DITL' (phAboutApp, purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {160, 182, 180, 262},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- {10, 75, 150, 316},
- StaticText {
- disabled,
- "This sample program illustrates the use of disk-based documents. "
- "\n\nThis program was written "
- "with MacApp® © 1985-1990 Apple Computer, Inc."
- };
- /* [3] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 1
- }
- }
- };
-
- include "Defaults.rsrc" 'ALRT' (phAboutApp); // Grab the default about box
-
- resource 'DITL' (kAboutDoc, purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {80, 182, 100, 262},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- {10, 75, 70, 310},
- StaticText {
- disabled,
- "The current document is ^0. "
- "It has ^1 card^2 and occupies ^3 bytes on disk."
- };
- /* [3] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 1
- }
- }
- };
-
- resource 'ALRT' (kAboutDoc, purgeable) {
- {90, 100, 200, 412},
- kAboutDoc,
- {
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent
- }
- };
-
- /*--------------------------------------*/
- /* Menus */
- /*--------------------------------------*/
-
- include "Defaults.rsrc" 'cmnu' (mApple); // Grab the default Apple/File menus
- include "Defaults.rsrc" 'cmnu' (mFile);
- include "Defaults.rsrc" 'cmnu' (mEdit);
- include "Defaults.rsrc" 'cmnu' (mBuzzwords); // Get the default buzzwords
-
- resource 'cmnu' (4) {
- 4,
- textMenuProc,
- 0x7FFFFF80,
- enabled,
- "Cards",
- { /* array: 7 elements */
- /* [1] */ "Next Card", noIcon, "F", noMark, plain, cNextCard;
- /* [2] */ "Previous Card", noIcon, "B", noMark, plain, cPrevCard;
- /* [3] */ "First Card", noIcon, "1", noMark, plain, cFirstCard;
- /* [4] */ "Last Card", noIcon, "2", noMark, plain, cLastCard;
- /* [5] */ "-", noIcon, noKey, noMark, plain, nocommand;
- /* [6] */ "Add Card", noIcon, "M", noMark, plain, cNewCard;
- /* [7] */ "Delete Card", noIcon, noKey, noMark, plain, cDeleteCard
- }
- };
-
- resource 'MBAR' (kMBarDisplayed) {
- {mApple; mFile; mEdit; 4}
- };
-
-
- include "Defaults.rsrc" 'STR#' (kDefaultCredits); // Grab the default credits
-
- // Get the default MacApp® application icon and necessary bundling rsrcs
- include "Defaults.rsrc" 'MApp' (0);
- include "Defaults.rsrc" 'FREF' (128);
- include "Defaults.rsrc" 'BNDL' (128);
- include "Defaults.rsrc" 'ICN#' (128);
-
- // Get the default Version resources
- include "Defaults.rsrc" 'vers' (1); // Application or file specific
- include "Defaults.rsrc" 'vers' (2); // Overall package
-